<?php
session_start();
$chkmidcode=$_SESSION["login_user_id"];
require_once("dbconfig.inc.php");
$sql = "SELECT *  FROM   plan_permission  WHERE (id_person='$chkmidcode') "; 
$dbquery =DBfieldQuery($sql);
$result = mysql_fetch_array($dbquery);
		$_SESSION["mid_person"]= $result[id_person];
		$_SESSION["midentify"] = $result[id_defalt];
		$_SESSION["name_perm"] = $result[name_perm];
		$_SESSION["password_new"] = $result[password_new];
		$_SESSION["password_old"] = $result[password_old];
		$_SESSION["mpms_add"] = $result[perm_add];
		$_SESSION["mpms_edit"] = $result[perm_edit];
		$_SESSION["mpms_dele"] = $result[perm_dele];
$sname_perm=$_SESSION["name_perm"];
if (empty($sname_perm))
		{
		$_SESSION["mpms_add"] = "0";
		$_SESSION["mpms_edit"] = "0";
		$_SESSION["mpms_dele"] = "0";
		}
?>